<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/11/3
  Time: 19:53
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="${pageContext.request.contextPath}/assets/images/favicon.png" type="image/png">
    <title>秒杀活动列表</title>

    <!-- BEGIN PAGE LEVEL STYLES -->
    <link href="${pageContext.request.contextPath}/assets/plugins/datatables/css/jquery.dataTables.min.css"
          rel="stylesheet" type="text/css"/>
    <link href="${pageContext.request.contextPath}/assets/plugins/datatables/css/jquery.dataTables-custom.css"
          rel="stylesheet" type="text/css"/>
    <!-- END PAGE LEVEL STYLES -->
    <link href="${pageContext.request.contextPath}/assets/css/icons.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/assets/css/bootstrap.min.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/assets/css/style.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/assets/css/responsive.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]-->
    <script src="${pageContext.request.contextPath}/js/html5shiv.min.js"></script>
    <script src="${pageContext.request.contextPath}/js/respond.min.js"></script>
    <!--[endif]-->

    <style>
        * {
            padding: 0;
            margin: 0;
        }

        .el-card__body {
            padding: 20px;
            background-color: white;
            font-size: 14px;
            border: solid 1px rgba(0,0,0,0.2);
        }

        .el-table th {
            white-space: nowrap;
            overflow: hidden;
            user-select: none;
            padding: 12px 0;
            min-width: 0;
            box-sizing: border-box;
            text-overflow: ellipsis;
            vertical-align: middle;
            position: relative;
        }

        .el-table--border th {
            border-right: 1px solid #ebeef5;
        }


        .el-table--border td {
            border-bottom: 1px solid #ebeef5;
        }


        label {
            display: inline-block;
            max-width: 100%;
            margin-bottom: 5px;
            font-weight: 700;
        }

        .table-responsive {
            min-height: .01%;
            overflow-x: auto;
        }

        /*窗口*/
        .window {
            padding-top: 20px;
            padding-bottom: 30px;
            border-radius: 2px;
            box-shadow: 0 0 3px grey;
            background-color: #fff;
            position: fixed;
            left: 0;
            top: 100px;
            display: none;
            z-index: 10;
        }

        /*中间层*/
        .not-active {
            position: fixed;
            top: 0;
            left: 0;
            bottom: 0;
            right: 0;
            background-color: rgba(0, 0, 0, .5);
            z-index: 5;
        }

        #shade {
            display: none;
        }

        /*关闭弹窗按钮*/
        .window .close-window {
            border: 0;
            outline: none;
            background-color: #fff;
        }

        .window .close-window:hover {
            color: deepskyblue;
            background-color: #fff;
        }

        .btn-default:hover {
            color: deepskyblue;
            background-color: rgb(235, 245, 255);
        }

        .btn:focus, .btn:active:focus, .btn.active:focus, .btn.focus, .btn:active.focus, .btn.active.focus {
            outline: none;
            box-shadow: none;
        }

        .pagination > li > button {
            position: relative;
            float: left;
            padding: 6px 12px;
            margin-left: -1px;
            line-height: 1.42857143;
            color: #337ab7;
            text-decoration: none;
            background-color: #fff;
            border: 1px solid #eee;
        }

        .pagination > .disabled > button, .pagination > .disabled > button:focus, .pagination > .disabled > button:hover {
            color: #777;
            cursor: not-allowed;
            background-color: #fff;
            border-color: #eee
        }

        .pagination > li > select, .pagination > li > input, .pagination > li > button {
            position: relative;
            float: left;
            padding: 6px 12px;
            margin-left: -1px;
            line-height: 1.42857143;
            text-decoration: none;
            background-color: #fff;
            border: 1px solid #ddd;
        }
        .pagination > li > input {
            outline: none;
        }
        .pagination > li > span:hover {
            background-color: #fff;
        }

        #select-window .form-group #btn-search {
            background-color: rgb(220, 220, 220);
            border: 1px solid #c5bebe;
            border-bottom-right-radius: 4px;
            border-top-right-radius: 4px;
            border-left: 0;
        }
        #select-window .form-group #search {
            border-bottom-left-radius: 4px;
            border-top-left-radius: 4px;
        }

    </style>

</head>

<body class="sticky-header">

<!--Start left side Menu-->
<jsp:include page="../inc/left.jsp"/>
<!--End left side menu-->


<!-- main content start-->
<div class="main-content">

    <!-- header section start-->
    <jsp:include page="../inc/header.jsp"/>
    <!-- header section end-->

    <div class="wrapper" style="background-color:rgb(230, 230, 238);">

        <!--Start Page Title-->
        <div class="page-title-box">
            <h2 class="page-title" style="color: black">秒杀商品列表</h2>
            <ol class="breadcrumb">
                <li>
                    <a href="#">首页</a>
                </li>
                <li>
                    <a href="#">营销</a>
                </li>
                <li class="active">
                    秒杀商品列表
                </li>
            </ol>
            <div class="clearfix"></div>
        </div>
        <!--End Page Title-->

        <div class="el-card__body col-sm-12">
            <i class="fa fa-file-text-o" aria-hidden="true"></i>
            <span style="font-size: 16px;">数据列表</span>
            <div style="float: right">
                <button id="btn-add" type="button" class="btn btn-info"
                        style="margin-right: 20px;">
                    <span>添加商品</span>
                </button>
            </div>
        </div>


        <div id="shade" class="not-active"></div>
        <%--Start 选择商品弹窗 --%>
        <div class="window row col-sm-5 col-sm-offset-4" id="select-window">
            <div class="col-sm-2" style="margin-bottom: 20px">
                <h4>选择商品</h4>
            </div>
            <button class="btn btn-default col-sm-1 col-sm-offset-9 close-window"><i class="ion-close"></i></button>
            <div class="col-sm-12">
                <form action="${pageContext.request.contextPath}/sell/flashProductRelation/addProducts" method="post" class="form-group">
                    <div class="col-sm-12" style="display: none">
                        <input id="curr-flashPromotion" name="flashPromotionId">
                        <input id="curr-flashSession" name="flashPromotionSessionId">
                        <input name="size" value="${pageInfo.pageSize}">
                        <input name="page" value="${pageInfo.pageNum}">
                    </div>
                    <div class="col-sm-4" style="margin-bottom: 20px;padding-right: 0">
                        <input id="search" class="form-control" placeholder="商品名称搜索">
                    </div>
                    <button type="button" class="btn col-sm-1" id="btn-search">
                        <i class="fa fa-search"></i>
                    </button>
                    <br>
                    <br>
                    <div class="col-sm-12" style="height: 300px; overflow-y: auto; margin-bottom: 20px">
                        <%--start 商品数据表格--%>
                        <table class="table table-bordered">
                            <thead>
                            <tr>
                                <th><input id="all-select" type="checkbox"></th>
                                <th>商品名称</th>
                                <th>货号</th>
                                <th>价格</th>
                            </tr>
                            </thead>
                            <tbody id="product-data">
                            </tbody>
                        </table>
                        <%--end 商品数据表格--%>
                    </div>
                    <%--start 提交或撤销--%>
                    <div class="col-sm-1 col-sm-offset-4">
                        <button id="add" type="submit" class="btn btn-success">添加</button>
                    </div>
                    <div class="col-sm-1 col-sm-offset-1">
                        <button id="cancel" type="button" class="btn btn-primary">取消</button>
                    </div>
                    <%--start 提交或撤销--%>
                </form>
            </div>
        </div>
        <%--End 选择商品弹窗 --%>

        <%--Start 编辑商品弹窗 --%>
        <div class="window row col-sm-5 col-sm-offset-4" id="update-window">
            <div class="col-sm-3" style="margin-bottom: 20px">
                <h4>编辑秒杀商品</h4>
            </div>
            <button class="btn btn-default col-sm-1 col-sm-offset-8 close-window"><i class="ion-close"></i></button>
            <div class="col-sm-12">
                <form action="${pageContext.request.contextPath}/sell/flashProductRelation/update" method="post"
                      class="form-group">
                    <div class="col-sm-12">
                        <div class="col-sm-12" style="display: none">
                            <div class="col-sm-3 text-right">
                                <label for="id">ID：</label>
                            </div>
                            <div class="col-sm-7">
                                <input id="id" name="id" class="form-control">
                            </div>
                            <div class="col-sm-3" style="display: none">
                                <input name="page" class="form-control" value="${pageInfo.pageNum}" readonly>
                            </div>
                            <div class="col-sm-3" style="display: none">
                                <input name="size" class="form-control" value="${pageInfo.pageSize}" readonly>
                            </div>
                            <div class="col-sm-3" style="display: none">
                                <input id="flashPromotionId" name="flashPromotionId" class="form-control" readonly>
                            </div>
                            <div class="col-sm-3" style="display: none">
                                <input id="flashPromotionSessionId" name="flashPromotionSessionId" class="form-control"
                                       readonly>
                            </div>
                        </div>
                        <div class="col-sm-3 text-right" style="padding-top: 3px">
                            <label>商品名称：</label>
                        </div>
                        <div class="col-sm-7">
                            <span id="name"></span>
                        </div>
                        <br>
                        <br>
                        <br>
                        <div class="col-sm-3 text-right" style="padding-top: 3px">
                            <label>货号：</label>
                        </div>
                        <div class="col-sm-7">
                            <span id="sn"></span>
                        </div>
                        <br>
                        <br>
                        <div class="col-sm-3 text-right" style="padding-top: 3px">
                            <label>商品价格：</label>
                        </div>
                        <div class="col-sm-7">
                            <span id="price"></span>
                        </div>
                        <br>
                        <br>
                        <div class="col-sm-3 text-right" style="padding-top: 3px">
                            <label for="flashPrice">秒杀价格：</label>
                        </div>
                        <div class="col-sm-7">
                            <input id="flashPrice" name="flashPromotionPrice" class="form-control">
                        </div>
                        <br>
                        <br>
                        <div class="col-sm-3 text-right" style="padding-top: 3px">
                            <label>剩余数量：</label>
                        </div>
                        <div class="col-sm-7">
                            <span id="count"></span>
                        </div>
                        <br>
                        <br>
                        <div class="col-sm-3 text-right" style="padding-top: 3px">
                            <label for="flashCount">秒杀数量：</label>
                        </div>
                        <div class="col-sm-7">
                            <input id="flashCount" name="flashPromotionCount" class="form-control">
                        </div>
                        <br>
                        <br>
                        <div class="col-sm-3 text-right" style="padding-top: 3px">
                            <label for="flashLimit">限购数量：</label>
                        </div>
                        <div class="col-sm-7">
                            <input id="flashLimit" name="flashPromotionLimit" class="form-control">
                        </div>
                        <br>
                        <br>
                        <div class="col-sm-3 text-right" style="padding-top: 3px">
                            <label for="sort">排序：</label>
                        </div>
                        <div class="col-sm-7">
                            <input id="sort" name="sort" class="form-control">
                        </div>
                        <br>
                        <br>
                        <br>
                        <div class="col-sm-1 col-sm-offset-4">
                            <input type="submit" value="确认" class="btn btn-success">
                        </div>
                        <div class="col-sm-1 col-sm-offset-1">
                            <button id="reset-edit" type="button" class="btn btn-primary">重置</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <%-- End 编辑商品弹窗 --%>


        <!--Start row-->
        <div class="row">
            <div class="col-md-12">
                <div class="white-box" style="border: solid 1px rgba(0,0,0,0.2); margin-top: 15px">
                    <br>
                    <div class="table-responsive">
                        <div id="example_wrapper" class="dataTables_wrapper">
                            <table id="example" class="table table-bordered">
                                <thead>
                                <tr>
                                    <th class="text-center">编号</th>
                                    <th class="text-center">商品名称</th>
                                    <th class="text-center">货号</th>
                                    <th class="text-center">商品价格</th>
                                    <th class="text-center">剩余数量</th>
                                    <th class="text-center">秒杀价格</th>
                                    <th class="text-center">秒杀数量</th>
                                    <th class="text-center">限购数量</th>
                                    <th class="text-center">排序</th>
                                    <th class="text-center">操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <c:forEach begin="0" end="${pageInfo.size - 1}" var="i">
                                    <tr>
                                        <td class="text-center">${pageInfo.list.get(i).id}</td>
                                        <td class="text-center">${pageInfo.list.get(i).product.name}</td>
                                        <td class="text-center">${pageInfo.list.get(i).product.productSn}</td>
                                        <td class="text-center">${pageInfo.list.get(i).product.price}</td>
                                        <td class="text-center">${pageInfo.list.get(i).product.stock}</td>
                                        <td class="text-center">${pageInfo.list.get(i).flashPromotionPrice}</td>
                                        <td class="text-center">${pageInfo.list.get(i).flashPromotionCount}</td>
                                        <td class="text-center">${pageInfo.list.get(i).flashPromotionLimit}</td>
                                        <td class="text-center">${pageInfo.list.get(i).sort}</td>
                                        <td class="handle text-center">
                                            <button id="btn-update" class="btn btn-info"
                                                    onclick="edit(${pageInfo.list.get(i).id})">编辑
                                            </button>
                                            <button id="btn-delete" class="btn btn-danger"
                                                    onclick="del(${pageInfo.list.get(i).id})">删除
                                            </button>
                                        </td>
                                    </tr>
                                </c:forEach>
                                </tbody>
                            </table>
                            <form action="" method="get" class="form-group">
                                <div style="display:none;">
                                    <input name="flashPromotionId" value="${pageInfo.list.get(1).flashPromotionId}" readonly>
                                    <input name="flashPromotionSessionId" value="${pageInfo.list.get(1).flashPromotionSessionId}" readonly>
                                </div>
                                <nav aria-label="..." style="text-align: left">
                                    <ul class="pagination">
                                        <li><span style="border-radius: 0">共 ${pageInfo.total} 条数据</span></li>
                                        <li>
                                            <select id="pageSize" name="size" style="outline: none; padding: 5.5px 12px">
                                                <option value="10" ${pageInfo.pageSize==10?"selected":""}>10条/页</option>
                                                <option value="20" ${pageInfo.pageSize==20?"selected":""}>20条/页</option>
                                                <option value="30" ${pageInfo.pageSize==30?"selected":""}>30条/页</option>
                                                <option value="50" ${pageInfo.pageSize==50?"selected":""}>50条/页</option>
                                            </select>
                                        </li>
                                        <%--Start 上一页按钮--%>
                                        <li class="${pageInfo.pageNum == 1 ? "disabled":""}">
                                            <c:choose>
                                                <c:when test="${pageInfo.pageNum == 1}">
                                                    <button type="button" aria-label="Previous">
                                                        上一页</button>
                                                </c:when>
                                                <c:when test="${pageInfo.pageNum gt 1}">
                                                    <button id="prev" type="button" aria-label="Previous">
                                                        上一页</button>
                                                </c:when>
                                            </c:choose>
                                        </li>
                                        <%--End 上一页按钮--%>
                                        <%--Start 页码--%>
                                        <c:forEach begin="1" end="${pageInfo.pages}" var="i">
                                            <li class="${pageInfo.pageNum == i ? "active":""}">
                                                <a href="${pageContext.request.contextPath}/sell/flashProductRelation/products?page=${i}&size=${pageInfo.pageSize}">
                                                        ${i} <span class="sr-only">(current)</span>
                                                </a>
                                            </li>
                                        </c:forEach>
                                        <%--End 页码--%>
                                        <%--Start 下一页按钮--%>
                                        <li class="${pageInfo.pageNum == pageInfo.pages ? "disabled":""}">
                                            <c:choose>
                                                <c:when test="${pageInfo.pageNum == pageInfo.pages}">
                                                    <button type="button" aria-label="Next">
                                                        下一页</button>
                                                </c:when>
                                                <c:when test="${pageInfo.pageNum lt pageInfo.pages}">
                                                    <button id="next" type="button" aria-label="Next">
                                                        下一页</button>
                                                </c:when>
                                            </c:choose>
                                        </li>
                                        <%--End 下一页按钮--%>

                                        <%-- Start 页码跳转 --%>

                                        <li><span>前往</span></li>
                                        <li><input id="target" name="page"
                                                       style="width: 40px;text-align: center" onkeydown="if(event.keyCode==13){enterSubmit()}"></li>
                                        <li><span>页</span></li>
                                        <li><button id="goto" type="button" class="btn btn-default"
                                                    style="text-align: center;">》</button></li>
                                        <%-- End 页码跳转 --%>
                                    </ul>
                                </nav>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!--End row-->
    </div>

    <!--Start  Footer -->
    <%@include file="../inc/footer.jsp" %>
    <!--End footer -->

</div>
<!--End main content -->


<!--Begin core plugin -->
<script src="${pageContext.request.contextPath}/assets/js/jquery.min.js"></script>
<script src="${pageContext.request.contextPath}/assets/js/bootstrap.min.js"></script>
<script src="${pageContext.request.contextPath}/assets/plugins/moment/moment.js"></script>
<script src="${pageContext.request.contextPath}/assets/js/jquery.slimscroll.js "></script>
<script src="${pageContext.request.contextPath}/assets/js/jquery.nicescroll.js"></script>
<script src="${pageContext.request.contextPath}/assets/js/functions.js"></script>
<!-- End core plugin -->

<!--Begin Page Level Plugin-->
<%--<script src="${pageContext.request.contextPath}/assets/plugins/datatables/js/jquery.dataTables.min.js"></script>--%>
<script src="${pageContext.request.contextPath}/assets/pages/table-data.js"></script>
<!--End Page Level Plugin-->

<script>
    // 当前秒杀商品所属的场次id 和 场次所属的活动id
    let flashPromotionId = ${pageInfo.list.get(1).flashPromotionId};
    let flashPromotionSessionId = ${pageInfo.list.get(1).flashPromotionSessionId};

    // 添加新秒杀商品时
    $("#btn-add").click(function () {
        $("#shade").fadeIn(300);
        $("#select-window").fadeIn(300);
        $("#all-select").prop("checked", false);
        $("#search").val(null);
        $("#curr-flashPromotion").val(flashPromotionId);
        $("#curr-flashSession").val(flashPromotionSessionId);
        $.ajax({
            type: 'get',
            url: '${pageContext.request.contextPath}/sell/flashProductRelation/queryProducts',
            success: function (response) {
                // console.info(response.data);
                let tableHtml = $("#product-data").html(null);
                response.data.forEach(o => {
                    tableHtml += '<tr><td><input class="select-one" type="checkbox" name="id" value="'+ o.id +'"></td><td>' +
                        o.name + '</td><td>' + o.productSn + '</td><td>￥' + o.price + '</td></tr>'
                })
                $("#product-data").html(tableHtml);
                select();
            }
        });
    });

    // 全选 全不选
    $("#all-select").change(function () {
        $(".select-one").prop("checked", this.checked);
    });

    function select() {
        // 商品总数
        let total = $(".select-one").length;
        $(".select-one").change(function () {
            // 被选中得商品数
            let count = $(".select-one:checked").length
            if (count === total) {
                $("#all-select").prop("checked", true);
            }else {
                $("#all-select").prop("checked", false);
            }
        })
    }

    // 搜索商品
    $("#btn-search").click(function () {
        let name = $("#search").val();
        $.ajax({
            type: 'get',
            url: '${pageContext.request.contextPath}/sell/flashProductRelation/queryProducts',
            data: {name: name},
            success: function (response) {
                // console.info(response)
                let tableHtml = $("#product-data").html('');
                response.data.forEach(o => {
                    tableHtml += '<tr><td><input class="select-one" type="checkbox" name="id" value="'+ o.id +'"></td><td>' +
                        o.name + '</td><td>' + o.productSn + '</td><td>￥' + o.price + '</td></tr>'
                })
                $("#product-data").html(tableHtml);
                select();
            }
        });
    })

    // 重置搜索框
    $("#cancel").click(function () {
        $("#search").val(null);
        $.ajax({
            type: 'get',
            url: '${pageContext.request.contextPath}/sell/flashProductRelation/queryProducts',
            success: function (response) {
                // console.info(response.data);
                let tableHtml = $("#product-data").html(null);
                response.data.forEach(o => {
                    tableHtml += '<tr><td><input class="select-one" type="checkbox" name="id" value="'+ o.id +'"></td><td>' +
                        o.name + '</td><td>' + o.productSn + '</td><td>￥' + o.price + '</td></tr>'
                })
                $("#product-data").html(tableHtml);
            }
        });
    })


    // 修改秒杀商品时回显
    function edit(id) {
        $("#shade").fadeIn(300);
        $("#update-window").fadeIn(300);
        $.ajax({
            type: 'get',
            url: '${pageContext.request.contextPath}/sell/flashProductRelation/queryById/' + id,
            success: function (response) {
                // console.info(response.data)
                $("#id").val(response.data.id);
                $("#flashPromotionId").val(flashPromotionId);
                $("#flashPromotionSessionId").val(flashPromotionSessionId);
                $("#name").text(response.data.product.name)
                $("#sn").text(response.data.product.productSn)
                $("#price").text(response.data.product.price)
                $("#flashPrice").val(response.data.flashPromotionPrice);
                $("#count").text(response.data.product.stock);
                $("#flashCount").val(response.data.flashPromotionCount);
                $("#flashLimit").val(response.data.flashPromotionLimit);
                $("#sort").val(response.data.sort);
                if (response.data.status == 1) {
                    $("#on").prop("checked", "checked");
                } else {
                    $("#off").prop("checked", "checked");
                }
            }
        })
    }

    // 删除确认
    function del(id) {
        let sure = confirm("确定删除吗？");
        if (sure) {
            console.info("确认删除")
            location.href = "${pageContext.request.contextPath}/sell/flashProductRelation/delete/" + id
                + "?flashPromotionId=" + flashPromotionId + "&flashPromotionSessionId=" + flashPromotionSessionId
                +"&size=" + ${pageInfo.pageSize};
        }
    }

    // 关闭窗口
    $(".close-window").click(function () {
        $(".window").fadeOut(100);
        $("#shade").fadeOut(100);
    })

    // 上一页
    $("#prev").click(function () {
        let size = $("#pageSize").val();
        location.href = "${pageContext.request.contextPath}/sell/flashProductRelation/products?flashPromotionId="+ flashPromotionId +
            "&flashPromotionSessionId="+ flashPromotionSessionId +"page=${pageInfo.pageNum - 1}" + "&size=" + size;
    })
    // 下一页
    $("#next").click(function () {
        let size = $("#pageSize").val();
        location.href = "${pageContext.request.contextPath}/sell/flashProductRelation/products?flashPromotionId="+ flashPromotionId +
            "&flashPromotionSessionId="+ flashPromotionSessionId +"page=${pageInfo.pageNum + 1}" + "&size=" + size;
    })

    // 每页显示条数改变
    $("#pageSize").change(function () {
        let size = $(this).val();
        location.href = '${pageContext.request.contextPath}/sell/flashProductRelation/products?flashPromotionId=' + flashPromotionId +
            '&flashPromotionSessionId=' + flashPromotionSessionId + '&page=1&size=' + size;

    })

    // 跳转指定页数
    $("#goto").click(function () {
        let target = $("#target").val();
        let pages = ${pageInfo.pages};
        if (target > pages) {
            target = pages;
        } else if (target < 1) {
            target = 1
        }
        location.href = '${pageContext.request.contextPath}/sell/flashProductRelation/products?flashPromotionId=' + flashPromotionId + '&flashPromotionSessionId=' +
            flashPromotionSessionId + '&page=' + target + '&size=' + ${pageInfo.pageSize}
    })

    function enterSubmit() {
        let size = $("#pageSize").val();
        let target = $("#target").val();
        let pages = ${pageInfo.pages};
        if (target > pages) {
            target = pages;
        }
        location.href='${pageContext.request.contextPath}/sell/flashProductRelation/products?flashPromotionId='
            + flashPromotionId + "&flashPromotionSessionId=" + flashPromotionSessionId + "&page=" + target + "&size=" + size;
    }

</script>
</body>

</html>

